//
//  SQRechangeTableViewCell.m
//  pai
//
//  Created by pro on 14-12-9.
//  Copyright (c) 2014年 linjunjing. All rights reserved.
//

#import "SQRechangeTableViewCell.h"

@implementation SQRechangeTableViewCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setItem:(inpour_record_t)inpour
{
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
    //[dateFormatter setDateFormat:@"MM-dd HH:mm:ss"];
    NSDate* time = [NSDate dateWithTimeIntervalSince1970:inpour.inpour_date];
    NSString *strDate = [dateFormatter stringFromDate:time];
    
    self.timeLabel.text = strDate;
    if (inpour.status == 1 ) {
        self.titleLabel.text = @"充值成功";
        self.numLabel.text = [NSString stringWithFormat:@"+%d",inpour.amt];
    }else if (inpour.status == 2){
        self.titleLabel.text = @"充值失败";
        self.numLabel.text = @"+0";
    }else if (inpour.status == 2){
        self.titleLabel.text = @"等待付款";
        self.numLabel.text = @"+0";
    }
    //self.titleLabel.text = inpour.
}

@end
